package com.ms.student;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@MapperScan("com.ms.student.mapper")
@SpringBootApplication
public class StudentMsApplication {

	public static void main(String[] args) {
	  //SpringApplication.run(MuseumApplication.class, args);
        log.info("MuseumApplication starting......");
        ConfigurableApplicationContext cofigAppCont = SpringApplication.run(StudentMsApplication.class, args);
        ConfigurableEnvironment confEnv = cofigAppCont.getEnvironment();
        String appName = confEnv.getProperty("spring.application.name");
        String port = confEnv.getProperty("server.port");
        String profilesActive = confEnv.getProperty("spring.profiles.active");

        log.info("StudentMsApplication Service Provider[env:{}] started on port {}, appName:{}  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", profilesActive, port, appName);
	}

}
